package com.zs.blog.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * @Title: CategoryVO
 * @Author zs
 * @Package com.zs.blog.model.vo
 * @Date 2024/10/20 16:31
 * @description: 分类视图对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = "分类视图对象")
public class CategoryListVO {
    @Schema(description = "分类ID")
    public Long id;

    @Schema(description = "分类名称")
    public String categoryName;

    @Schema(description = "分类下的文章数")
    public Integer articleCount;

    @Schema(description = "创建时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING)
    public LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss",shape = JsonFormat.Shape.STRING)
    public LocalDateTime updateTime;
}
